VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{B3FB64BF-91F9-11D7-A482-0008A14158BC}#2.22#0"; "ITGControls.ocx"
Begin VB.Form frmTasks 
   Caption         =   "Tasks"
   ClientHeight    =   7320
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7200
   Icon            =   "frmTasks.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   7320
   ScaleWidth      =   7200
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdSave 
      Caption         =   "&Save"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2160
      TabIndex        =   14
      Top             =   6795
      Width           =   1335
   End
   Begin VB.Frame Frame3 
      Height          =   735
      Left            =   3480
      TabIndex        =   23
      Top             =   120
      Width           =   3615
      Begin VB.Label lblUser 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000004&
         Caption         =   "Employee Name"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   285
         Left            =   120
         TabIndex        =   24
         Top             =   240
         Width           =   3405
      End
   End
   Begin VB.Frame Frame2 
      Height          =   735
      Left            =   240
      TabIndex        =   18
      Top             =   120
      Width           =   3135
      Begin VB.Label lblDate 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000004&
         Caption         =   "Date"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   285
         Left            =   240
         TabIndex        =   19
         Top             =   240
         Width           =   585
      End
   End
   Begin VB.Frame Frame1 
      Height          =   5745
      Left            =   240
      TabIndex        =   16
      Top             =   855
      Width           =   6855
      Begin VB.ComboBox Combo1 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         ItemData        =   "frmTasks.frx":0442
         Left            =   1410
         List            =   "frmTasks.frx":0476
         TabIndex        =   33
         Top             =   5295
         Width           =   1845
      End
      Begin VB.CheckBox Check1 
         Caption         =   "Remider:"
         Height          =   330
         Left            =   315
         TabIndex        =   32
         Top             =   5295
         Width           =   1065
      End
      Begin VB.TextBox txtRequestName 
         Appearance      =   0  'Flat
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   3180
         MaxLength       =   50
         TabIndex        =   31
         Tag             =   "Client ID"
         Top             =   1725
         Width           =   3405
      End
      Begin RichTextLib.RichTextBox txtRemarks 
         Height          =   1890
         Left            =   240
         TabIndex        =   13
         Top             =   3285
         Width           =   6360
         _ExtentX        =   11218
         _ExtentY        =   3334
         _Version        =   393217
         Enabled         =   -1  'True
         Appearance      =   0
         TextRTF         =   $"frmTasks.frx":0510
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin ITGControls.ITGTextBox txtSubject 
         Height          =   285
         Left            =   240
         TabIndex        =   12
         Top             =   2895
         Width           =   6360
         _ExtentX        =   11007
         _ExtentY        =   503
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Label           =   "Subject"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1200
         TextBoxWidth    =   5100
      End
      Begin VB.ComboBox cboEndTime 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         ItemData        =   "frmTasks.frx":058B
         Left            =   1440
         List            =   "frmTasks.frx":05B6
         TabIndex        =   2
         Top             =   975
         Width           =   1365
      End
      Begin VB.ComboBox cboStarTime 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         ItemData        =   "frmTasks.frx":063C
         Left            =   1440
         List            =   "frmTasks.frx":065E
         TabIndex        =   1
         Top             =   615
         Width           =   1365
      End
      Begin VB.ComboBox cboStatus 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         ItemData        =   "frmTasks.frx":06C6
         Left            =   1440
         List            =   "frmTasks.frx":06D3
         TabIndex        =   10
         Top             =   2490
         Width           =   1845
      End
      Begin VB.TextBox txtJobOrder 
         Appearance      =   0  'Flat
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   4815
         MaxLength       =   12
         TabIndex        =   27
         Tag             =   "Client ID"
         Top             =   2115
         Width           =   1770
      End
      Begin VB.ComboBox cboPriority 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         ItemData        =   "frmTasks.frx":06FC
         Left            =   1440
         List            =   "frmTasks.frx":0709
         TabIndex        =   9
         Top             =   2115
         Width           =   1365
      End
      Begin VB.TextBox txtEmployeeName 
         Appearance      =   0  'Flat
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   3180
         MaxLength       =   50
         TabIndex        =   25
         Tag             =   "Client ID"
         Top             =   1350
         Width           =   3405
      End
      Begin ITGControls.ITGCommandButton cmdEmployeeID 
         Height          =   315
         Left            =   2820
         TabIndex        =   6
         Top             =   1350
         Width           =   315
         _ExtentX        =   556
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Picture         =   "frmTasks.frx":0720
         Caption         =   ""
      End
      Begin ITGControls.ITGDateBox txtStartDate 
         Height          =   285
         Left            =   4800
         TabIndex        =   3
         Top             =   630
         Width           =   1815
         _ExtentX        =   3201
         _ExtentY        =   503
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   ""
      End
      Begin ITGControls.ITGDateBox txtEndDate 
         Height          =   285
         Left            =   4800
         TabIndex        =   4
         Top             =   990
         Width           =   1815
         _ExtentX        =   3201
         _ExtentY        =   503
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   ""
      End
      Begin ITGControls.ITGTextBox txtTaskID 
         Height          =   285
         Left            =   240
         TabIndex        =   0
         Top             =   225
         Width           =   2565
         _ExtentX        =   4313
         _ExtentY        =   503
         BackColor       =   14737632
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Label           =   "Task ID"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1200
         TextBoxWidth    =   1305
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtComplete 
         Height          =   285
         Left            =   3615
         TabIndex        =   11
         Top             =   2490
         Width           =   2325
         _ExtentX        =   3889
         _ExtentY        =   503
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0"
         DataType        =   1
         DecimalPlace    =   2
         Label           =   "% Complete"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1200
         TextBoxWidth    =   1065
      End
      Begin ITGControls.ITGTextBox txtEmployeeID 
         Height          =   285
         Left            =   240
         TabIndex        =   5
         Top             =   1365
         Width           =   2565
         _ExtentX        =   4313
         _ExtentY        =   503
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Label           =   "Employee"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1200
         TextBoxWidth    =   1305
      End
      Begin ITGControls.ITGCommandButton cmdRequestBy 
         Height          =   315
         Left            =   2820
         TabIndex        =   8
         Top             =   1725
         Width           =   315
         _ExtentX        =   556
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Picture         =   "frmTasks.frx":0CA6
         Caption         =   ""
      End
      Begin ITGControls.ITGTextBox txtRequestBy 
         Height          =   285
         Left            =   240
         TabIndex        =   7
         Top             =   1740
         Width           =   2565
         _ExtentX        =   4313
         _ExtentY        =   503
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Label           =   "Requested by"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1200
         TextBoxWidth    =   1305
      End
      Begin ITGControls.ITGCommandButton ITGCommandButton1 
         Height          =   315
         Left            =   3300
         TabIndex        =   34
         Top             =   5295
         Width           =   315
         _ExtentX        =   556
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Picture         =   "frmTasks.frx":122C
         Caption         =   ""
      End
      Begin VB.Label Label11 
         Caption         =   "%"
         Height          =   285
         Left            =   6135
         TabIndex        =   30
         Top             =   2535
         Width           =   435
      End
      Begin VB.Label Label9 
         Caption         =   "Status"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   255
         TabIndex        =   29
         Top             =   2565
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "Job Order"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   3660
         TabIndex        =   28
         Top             =   2175
         Width           =   975
      End
      Begin VB.Label Label7 
         Caption         =   "Priority"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   26
         Top             =   2175
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "End Date"
         Height          =   285
         Left            =   3600
         TabIndex        =   22
         Top             =   990
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "End Time"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   21
         Top             =   1020
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "Start Time"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   240
         TabIndex        =   20
         Top             =   630
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "Start Date"
         Height          =   285
         Left            =   3600
         TabIndex        =   17
         Top             =   630
         Width           =   975
      End
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "&Cancel"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3840
      TabIndex        =   15
      Top             =   6795
      Width           =   1335
   End
End
Attribute VB_Name = "frmTasks"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'IT Group Inc. 2005.09.23

Option Explicit


Private strNo As String

'ADO Connection variables

Private connTasks As ADODB.Connection

Dim WithEvents rsTasks As ADODB.Recordset
Attribute rsTasks.VB_VarHelpID = -1

Private Sub cmdExit_Click()
    Choice = "Cancel"
    Unload Me
End Sub

Private Sub cmdSave_Click()
    Choice = "Save"
    connTasks.BeginTrans

    rsTasks.UpdateBatch adAffectAll

    connTasks.CommitTrans
    If lTasksFlag = "Edit" Then
        frmModuleExplorer.ListView2.SelectedItem.SubItems(1) = Format(txtEndDate.Text, "mmm-dd")
        frmModuleExplorer.ListView2.SelectedItem.SubItems(2) = txtSubject.Text
    ElseIf lTasksFlag = "Edit-Rem" Then
        frmReminders.lvwReminders.SelectedItem = Format(txtEndDate.Text, "mmm-dd")
        frmReminders.lvwReminders.SelectedItem.SubItems(2) = txtSubject.Text
    End If
    If lTasksFlag = "New" Or lTasksFlag = "Notify" Then
       UpdateCtrlNo
    End If
    Unload Me
End Sub

Private Sub Form_Load()

    Set rsTasks = New ADODB.Recordset
    OpenNewConnection connTasks

    rsTasks.CursorLocation = adUseClient
    If lTasksFlag = "New" Or lTasksFlag = "Notify" Then
        rsTasks.Open "SELECT * FROM TASKS WHERE cEmployeeID = '" & SecUserID & "'", _
            connTasks, adOpenStatic, adLockBatchOptimistic
    ElseIf lTasksFlag = "Edit" Then
        rsTasks.Open "SELECT * FROM TASKS WHERE cTaskID = '" & frmModuleExplorer.ListView2.SelectedItem.SubItems(3) & "'", _
            connTasks, adOpenStatic, adLockBatchOptimistic
    ElseIf lTasksFlag = "Edit-Rem" Then
        rsTasks.Open "SELECT * FROM TASKS WHERE cTaskID = '" & frmReminders.lvwReminders.SelectedItem.SubItems(4) & "'", _
            connTasks, adOpenStatic, adLockBatchOptimistic
    End If
    rsTasks.MarshalOptions = adMarshalModifiedOnly
    SetDataSource
    SetDataField
    If lTasksFlag = "New" Then
       rsTasks.AddNew
       rsTasks!cEmployeeID = SecUserID
       txtStartDate.Text = Format(frmModuleExplorer.Calendar1.Value, "mm/dd/yyyy")
       txtEndDate.Text = Format(frmModuleExplorer.Calendar1.Value, "mm/dd/yyyy")
       GetCtrlNo
    ElseIf lTasksFlag = "Notify" Then
       rsTasks.AddNew
       rsTasks!cEmployeeID = SecUserID
       txtStartDate.Text = Format(Now, "mm/dd/yyyy")
       txtEndDate.Text = Format(Now, "mm/dd/yyyy")
       GetCtrlNo
    End If
    If lTasksFlag = "Notify" Then
        lblDate.Caption = Format(Now, "mmmm dd, yyyy")
    Else
        lblDate.Caption = Format(frmModuleExplorer.Calendar1.Value, "mmmm dd, yyyy")
    End If
    lblUser = SecUserName

End Sub

'Sets the data source of the controls
Sub SetDataSource()
    Set FrmName = Me
    BindControls rsTasks
    'txtRemarks.DataSource rsTasks
End Sub

'Sets the data field for every bounded controls
Sub SetDataField()
    With rsTasks
        txtTaskID.DataField = !cTaskID
        cboStarTime.DataField = "dTimeFrom"
        cboEndTime.DataField = "dTimeTo"
        txtStartDate.DataField = !dDateFrom
        txtEndDate.DataField = !dDateTo
        txtEmployeeID.DataField = !cEmployeeID
        txtRequestBy.DataField = !cRequestBy
        txtSubject.DataField = !cDescription
        cboPriority.DataField = "cPriority"
        cboStatus.DataField = "cStatus"
        txtRemarks.DataField = "cNotes"
        txtComplete.DataField = !nComplete
    End With
End Sub

Private Sub Form_Unload(Cancel As Integer)
    
    Set rsTasks = Nothing
    Set connTasks = Nothing
    Set frmTasks = Nothing
    lCloseWindow = True
End Sub

Sub GetCtrlNo()
Dim xxx As String

    strNo = Trim(GetValueFrTable("cTasksIDNo", "SEC_USER", "UserID = '" & SecUserID & "'", True))
    xxx = Trim(GetValueFrTable("Initials", "SEC_USER", "UserID = '" & SecUserID & "'", True))

    If Mid(strNo, 5, 2) <> Format(Date, "yy") Then
        txtTaskID = Format(1, "0000")
        strNo = xxx + "-" + Format(Date, "yy") + "0000"
    Else
        txtTaskID = Format(Right(strNo, 4) + 1, "0000")
    End If
    txtTaskID = xxx + "-" + Format(Date, "yy") + Trim(txtTaskID)
End Sub


'Update system generated number
Sub UpdateCtrlNo()
On Error GoTo TheSource

    'If (Left(txtTaskID, 5) & (Format(Right(txtTaskID, 4) - 1, "0000"))) <> (strNo) Then Exit Sub
    sSQL = "UPDATE SEC_USER SET cTasksIDNo = '" & Trim(txtTaskID) & "' WHERE UserID = '" & SecUserID & "'"
    connTasks.Execute sSQL

TheSource:
    Exit Sub
End Sub

Private Sub cmdEmployeeID_Click()
    If lPickListActive Then Exit Sub
    sFilterString = Trim(txtEmployeeID)
    frmITGPickList.mType = User
    frmITGPickList.Show vbModal
    txtEmployeeID = frmITGPickList.mCode
    txtEmployeeName = frmITGPickList.mName
    If Trim(txtEmployeeName) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub txtEmployeeID_Change()
    txtEmployeeName = ""
    txtEmployeeName = GetValueFrTable("FirstName", "SEC_USER", "UserID = '" & Trim(txtEmployeeID) & "'", True)
End Sub

Private Sub txtEmployeeID_LostFocus()
    If Trim(txtEmployeeName) = "" And Trim(txtEmployeeID) <> "" Then cmdEmployeeID_Click
End Sub

Private Sub cmdRequestBy_Click()
    If lPickListActive Then Exit Sub
    sFilterString = Trim(txtRequestBy)
    frmITGPickList.mType = User
    frmITGPickList.Show vbModal
    txtRequestBy = frmITGPickList.mCode
    txtRequestName = frmITGPickList.mName
    If Trim(txtRequestName) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub txtRequestBy_Change()
    txtRequestName = ""
    txtRequestName = GetValueFrTable("FirstName", "SEC_USER", "UserID = '" & Trim(txtRequestBy) & "'", True)
End Sub

Private Sub txtRequestBy_LostFocus()
    If Trim(txtRequestName) = "" And Trim(txtRequestBy) <> "" Then cmdRequestBy_Click
End Sub

